EMT Practice Test

1. Question Content...


Question List

Question1: Which of the following expressions evaluate to True? (Select two answers)

Question2: What is true about Python packages? (Select two answers)

Question3: Executing the following snippet

will cause the dct:

Question4: Which of the following statements are true? (Select two answers)

Question5: Which of the equations are True? (Select two answers)

Question6: A Python module named pymod.py contains a variable named pyvar.
Which of the following snippets will let you access the variable? (Select two answers)

Question7: If you need to serve two different exceptions called Ex1 and Ex2 in one except branch, you can write:

Question8: Which of the following expressions evaluate to True? (Select two answers)

Question9: Is it possible to safely check if a class object has a certain attribute0

Question10: If you want to access an exception object's components and store them in an object called e, you have to use the following form of exception statement

Question11: With regards to the directory structure below, select the proper forms of the directives in order to import module_ a. (Select two answers)

Question12: What is true about Python packages? (Select two answers)

Question13: Assuming that the following code has been executed successfully, select the expressions which evaluate to True (Select two answers.)

Question14: What is the expected behavior of the following snippet?

It will:

Question15: Assuming that the following snippet has been successfully executed, which of the equations are True? (Select two answers)

Question16: A file name like this one below says mat: (select three answers)
services. cpython-36.pyc

Question17: You need data which can act as a simple telephone directory. You can obtain it with the following clauses (choose two relevant variants; assume that no other items have been created before)

Question18: What is the expected behavior of the following code?

Question19: What is the expected output of the following code?

Question20: What is the expected output of the following code if existing_file is the name of a file located inside the working directory?

Question21: Which of the following expression evaluate to True? (Select two answers) A)

B)

C)

D)

Question22: What is the expected behavior of the following code?

Question23: What is the expected behavior of the following code?
x = 8 ** (1/3)
y = 2. if x < 2.3 else 3.
print(y)

Question24: You are going to read just one character from a stream called s. Which statement would you use?

Question25: Which of the following expressions evaluate to True? (Select two answers)

Question26: Assuming that the snippet below has been executed successfully, which of the following expressions will evaluate to True? (Select two answers) string = 'SKY' (:: -1) string = string (-1)

Question27: A two-parameter lambda function raising its first parameter to the power of the second parameter should be declared as:

Question28: Which of the following statements are true? (Select two answers)

Question29: What is the expected output of the following snippet?

Question30: What is the expected output of the following code?

Question31: What is the expected behavior of the following snippet?

It will:

Question32: Which of the following statements are true? (Select two answers)

Question33: Assuming that the code below has been placed inside a file named code.py and executed successfully, which of the following expressions evaluate to True? (Select two answers)

Question34: What is the expected output of the following snippet?

Question35: What is true about the following snippet? (Select two answers)

Question36: The following class hierarchy is given. What is the expected out of the code?

Question37: What is the expected behavior of the following code?

It will:

Question38: What is the expected behavior of the following code?

Question39: Assuming that the V variable holds an integer value to 2, which of the following operators should be used instead of OPER to make the expression equal to 1?
V OPER 1 -

Question40: What is the output of the following piece of code?

Question41: What is true about Object-Oriented Programming in Python? (Select two answers)

Question42: The following class definition is given. We want the show () method to invoke the get () method, and then output the value the get () method returns. Which of the invocations should be used instead of XXX?

Question43: Which of the following statements are true? (Select two answers)

Question44: Which of the following expressions evaluate to True? (Select two answers)

Question45: Assuming that the following code has been executed successfully, select the expressions which evaluate to True (Select two answers)

Question46: What is the expected behavior of the following code?

Question47: A Python module named pymod, py contains a function named pyfun ( ).
Which of the following snippets will let you invoke the function? (Select two answers)

Question48: What can you do if you don't like a long package path tike this one0 import alpha.beta.gamma.delta.epsiIon.zeta

Question49: Which one of the platform module functions should be used to determine the underlying platform name?

Question50: What is the expected output of the following code?

Question51: What is the expected behavior of the following code?

Question52: The first parameter of each method: